Skip to content

Submodule depth #1009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 4, 2020
Merged

Conversation

liambeguin
Copy link
Contributor

No description provided.

@liambeguin
Copy link
Contributor Author

Hi,

I managed to test it locally but I'm having trouble with the test case...
this is how I tested it:

$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install . 
$ rm -rf foo && python ./test.py 

test.py file:

import git

repo = git.Repo.init('foo')

sm_name = 'test'
sm_depth = 1

sm = repo.create_submodule(sm_name, sm_name, url='https://github.com/gitpython-developers/GitPython.git', depth=sm_depth)
print(len(list(sm.module().iter_commits())), sm_depth)
assert len(list(sm.module().iter_commits())) == sm_depth

Byron pushed a commit that referenced this pull request May 4, 2020
…and time is previous. Since I could reproduce it and see it working
with the steps provided in the comment:

#1009 (comment)

I think it's good for now. We also assume there won't be a regression.
@Byron Byron merged commit d6e1dcc into gitpython-developers:master May 4, 2020
@Byron Byron added this to the v3.1.2 - Bugfixes milestone May 4, 2020
@Byron
Copy link
Member

Byron commented May 4, 2020

Thanks a lot, especially for making it so easy to reproduce it is indeed working.
Since I also couldn't figure out why the test ignored the passed depth parameter, even though it did show up in the invoked git command, I marked this test as permanently skipped to document the issue. Maybe someone will find the answer one day :).

@liambeguin
Copy link
Contributor Author

Great! Thanks for reviewing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants